//
//  MathUtil.hpp
//  math3d
//
//  Created by 姚或 on 2021/1/29.
//

#ifndef MathUtil_hpp
#define MathUtil_hpp


#include <math.h>

const float kPI = 3.14159265;
const float k2PI = kPI * 2;
const float kPIOver2 = kPI / 2.0;
const float k1OverPI = 1.0 / kPI;
const float k1Over2PI = 1.0 / k2PI;

extern float wrapPI(float theta);

extern float safeAcos(float x);

inline void sinCos(float *returnSin, float *returnCos, float theta){
    *returnSin = sin(theta);
    *returnCos = cos(theta);
}

#endif /* MathUtil_hpp */
